{% macro render_field(field) %}
  <dt>{{ field.label }}:
  <dd>{{ field(**kwargs)|safe }}
  {% if field.errors %}
    <span class="error">
    {% for error in field.errors %}
      {{ error }}
    {% endfor %}
    </span>
  {% endif %}
  </dd>
{% endmacro %}


{% macro render_field_without_label(field) %}
  <dd>{{ field(**kwargs)|safe }}
  {% if field.errors %}
    <span class="error">
    {% for error in field.errors %}
      {{ error }}
    {% endfor %}
    </span>
  {% endif %}
  </dd>
{% endmacro %}


{% macro render_boolean_field(field) %}
  <dd>{{ field(**kwargs)|safe }} {{ field.label }}
  {% if field.errors %}
    <span class="error">
    {% for error in field.errors %}
      {{ error }}
    {% endfor %}
    </span>
  {% endif %}
  </dd>
{% endmacro %}


{% macro render_errors(field) %}
  {% if field.errors %}
    <span class="error">
    {% for error in field.errors %}
      {{ error }}
    {% endfor %}
    </span>
  {% endif %}
{% endmacro %}
